<html xmlns:th="http://www.thymeleaf.org">
<head>
    <div th:insert="~{ /common/common_header:: meta('服务器配置')}"></div>

    <div th:insert="~{ /common/common_header:: base}"></div>
    <div th:insert="~{ /common/common_header:: table}"></div>
    <div th:insert="~{ /common/common_header:: editable}"></div>

</head>
<body>
<!--模态框loading-->
<div th:insert="~{ /common/common_loading:: loading}"></div>
<!--模态框loading-->
<!--顶部导航条(用户信息)-->
<div th:insert="~{ /common/common_bar:: navbar}"></div>
<!--顶部导航条(用户信息)-->
<!--主体-->
<div class="container-fluid ">
    <div class="row">

        <!--左侧导航栏-->
        <div th:insert="~{ /common/common_menu:: menus}"></div>
        <!--左侧导航栏-->

        <!--右侧主题部分 configEdit start-->
        <div class="col-xs-12 col-sm-9 col-lg-10" id="configEdit" style="display: inline-block">

            <!--通用的tab-->
            <div th:insert="~{ /common/common_tab::tab('服务器')}"></div>
            <!--通用的tab-->

            <!--工具栏-->
            <div th:insert="~{ /common/common_bar:: toolbar('服务器筛选')}"></div>
            <!--工具栏-->

            <!--列表-->
            <div th:insert="~{ /common/common_body:: list}"></div>
            <!--列表-->

            <!--用做信息的添加-->
            <form id="add" class="form-horizontal" method="post" style="display: none">
                <div class="panel panel-default" style="position: relative">
                    <div class="panel-heading" >
                        <h3 class="panel-title" style="display: inline-block" id="typeTitle">服务器添加</h3>
                        <div style="position: absolute;right: 0.5%;top: 0.25%">
                            <button class="btn btn-primary" type="button" style="" onclick="confirmVal()">确定</button>
                            <button class="btn btn-danger" type="button" style="" onclick="clearVal()">清空</button>
                        </div>
                    </div>
                    <div class="panel-body">
                        <div class="form-group required">
                            <label for="" class="col-sm-2 control-label">名称</label>
                            <div class="col-sm-9">
                                <input type="text" name="name" class="form-control val" placeholder="名称">
                            </div>
                        </div>
                        <div class="form-group required">
                            <label for="" class="col-sm-2 control-label">IP</label>
                            <div class="col-sm-9">
                                <input type="text" name="host" class="form-control val" placeholder="127.0.0.1">
                            </div>
                        </div>
                        <div class="form-group required">
                            <label for="" class="col-sm-2 control-label">端口</label>
                            <div class="col-sm-9">
                                <input type="text" name="port" class="form-control val" placeholder="22" value="22">
                            </div>
                        </div>
                        <div class="form-group required">
                            <label for="" class="col-sm-2 control-label">用户名</label>
                            <div class="col-sm-9">
                                <input type="text" name="user" class="form-control val" placeholder="用户名" value="root">
                            </div>
                        </div>
                        <!--连接方式 0:密码,1:key way-->
                        <div class="form-group required">
                            <label for="" class="col-sm-2 control-label">连接方式</label>
                            <div class="col-sm-9">
                                <label class="checkbox-inline">
                                    <input class="val password" type="radio" name="way" value="0" checked onclick="hideKey(this)"> 密码
                                </label>
                                <label class="checkbox-inline">
                                    <input  class="val pubKey" type="radio" name="way" value="1" onclick="hidePass(this)"> key
                                </label>
                            </div>
                        </div>
                        <div class="form-group pass">
                            <label for="" class="col-sm-2 control-label">密码</label>
                            <div class="col-sm-9">
                                <input type="text" name="pass" class="form-control val" placeholder="密码">
                            </div>
                        </div>

                        <div class="form-group key hide">
                            <label for="" class="col-sm-2 control-label">PubKey</label>
                            <div class="col-sm-9">
                                <select class="js-example-basic-single form-control val" name="pubKey" id="dropdown_key">
                                </select>
                            </div>
                        </div>
                        <!--<div class="form-group key hide">
                            <label for="" class="col-sm-2 control-label">Pubkey短语</label>
                            <div class="col-sm-9">
                                <input type="text" name="phrase" class="form-control val" placeholder="">
                            </div>
                        </div>-->
                        <div class="form-group required">
                            <label for="" class="col-sm-2 control-label">描述</label>
                            <div class="col-sm-9">
                                <textarea type="text" name="desc" class="form-control val"
                                          placeholder="服务器描述"></textarea>
                            </div>
                        </div>

                        <input type="hidden" name="operator" class="val">
                    </div>
                </div>
            </form>
            <!--用做信息的添加-->
        </div>
        <!--右侧主题部分 configEdit end-->

    </div>
</div>
</div>
<!--都要依赖的基础js-->
<div th:insert="~{ /common/common_foot:: base}"></div>
<!--表格相关-->
<div th:insert="~{ /common/common_foot:: table}"></div>
<!--提示框 alert confirm-->
<div th:insert="~{ /common/common_foot:: bootbox}"></div>
<!--导出表格-->
<div th:insert="~{ /common/common_foot:: export}"></div>
<!--行内编辑,放在表格初始化之后-->
<div th:insert="~{ /common/common_foot:: editable}"></div>

<script th:src="@{/assets/js/base/ajax.js}" type="text/javascript"></script>
<script th:src="@{/assets/js/base/server.js}" type="text/javascript"></script>

</body>
</html>
